package com.neusoft.neu24.nep.controller;

import org.hibernate.validator.internal.constraintvalidators.hv.UUIDValidator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

import static com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat.UUID;


@RestController
@RequestMapping("/corp")
public class TestController {


    @Autowired
    private StreamBridge streamBridge;

    @GetMapping("/im")
    public String im() {
        String uuid = System.currentTimeMillis() + "";   //  TimeUnit.SECONDS.sleep(2);
        streamBridge.send("im-out", "im-out-" + uuid);
        return "success";
    }
}
